Introduction to value sets
[edit]
A Value set is an object, which represents the set of values a variable may have. The value set behaves mathematically as a single value, while internally representing multiple values. To achieve this the the Value Set tracks the value along with the context, or world, in which they occurred.
Multiple solutions to an equation
[edit]
In mathematics, an expression must represent a single value. For example consider the equation,
which implies,
But this is a bit long winded, and it does not allow us to work with multiple values at the same time. If further conditions or constraints are added to x we would like to consider each value to see if it matches the constraint. So naively we would like to write,
Naively then,
but this is wrong. Each x must represent a single value in the expression. Either x is 2 or x = -2. This can be resolved by keeping track of the two values so that we make sure that the values are used consistently, and this is what a value set does.
The value set for 'x' is written as,
It is container V which has a set of tag, value pairs,
The value 2 is associated with the possible world . The value -2 is associated with the possible world . This means that the value cannot be both 2 and -2 at the same time. In the world the value of the value set must be 2. In the world the value of the value set must be -2.
The solution of the equation,
is,
A world set is a set of possible worlds that represent all possibilities. So is a world set as either x = 2 (in world ) or x= -2 (in world ). There are no other possibilities.
Worlds from the same world set are mutually exclusive, so it is not possible that the propositions for both worlds and are true at the same time.
Application of functions
[edit]
The rule for the application of functions to value sets is,
For example,
is,
The intersection of the possible world with itself is the possible world,
The intersection of the possible world with another possible world from the same world set is empty,
So,
The empty worlds rule allows tagged values from empty worlds to be dropped
giving,
Giving the result that is either -4 or 4, as expected.
Application to Booleans
[edit]
Is a relationship between a, b and true that implies that both a and b must be true.
Allows multiple values for a and b. If a is,
then for b
This means that if a is false then b must be true.
Now consider,
gives,
and
unifying these two value sets gives,
The pair is dropped because of the "assert equal" rule,
Its value did not match with .